package com.github.limit.response;

import com.alibaba.fastjson.JSONObject;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author: wangdejun
 * @create: 2019-10-14 19:02
 **/
public class DefaultResult implements IResult {
    @Override
    public void send(HttpServletRequest request, HttpServletResponse response) throws Exception {

        Response<Object> result = Response.builder().code(500).message("服务繁忙，请稍后重试").build();
        response.setContentType("application/json;charset=UTF-8");
        response.getWriter().write(JSONObject.toJSONString(result));

    }
}
